package com.atguigu.gmall.flume.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;

/**
 * @author layne
 */
public class JSONUtils {
    public static void main(String[] args) {
        System.out.println(isJSON("{\"aaa\":111}"));
    }

    public static boolean isJSON(String log) {
        try {
            JSONObject jsonObject = JSON.parseObject(log);
            return true;
        } catch (JSONException e) {
            return false;
        }
    }
}
